/*任务审核*/
import React from "react";
import {connect} from "dva";
import { createForm } from 'rc-form';
import { routerRedux } from 'dva/router';
import moment from 'moment';
import {ImagePicker, Button, TextareaItem, WhiteSpace, DatePicker, List  } from "antd-mobile";
import banner from '../../../../assets/work/dsb.jpg';
import styles from './rwaudit.less'
const empty = require('is-empty');



const Item = List.Item;
class rwaudit extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
    };
  }
  //==生命周期--页面渲染
  render() {

    const { getFieldProps } = this.props.form;
    return (
      <div className='taskadd' style={{backgroundColor: '#eee'}}>
        <WhiteSpace />
        <List>
          <Item>赴机场集团调研督导</Item>

          <TextareaItem
            {...getFieldProps('note1')}
            rows={6}
            placeholder="这里是任务详情，这里是任务详情，这里是任务详情，这里是任务详情，这里是任务详情，这里是任务详情，"
          />
        </List>
        <WhiteSpace />
        <List>
          <DatePicker
            mode="date"
            title="选择开始时间"
            {...getFieldProps('startTime', {

            })}>
            <List.Item arrow="horizontal">开始时间</List.Item>
          </DatePicker>
          <DatePicker
            mode="date"
            title="选择结束时间"
            {...getFieldProps('endTime', {

            })}>
            <List.Item arrow="horizontal">结束时间</List.Item>
          </DatePicker>
        </List>
        <WhiteSpace />
        <List className="touxiang">
          <Item
            extra="2017-09-28 12:00"
            onClick={() => {}}
          ><img src={banner} style={{width:'0.9rem',height:'0.9rem'}}/>&nbsp;&nbsp;<span>姓名  发布了任务</span></Item>
        </List>
        <WhiteSpace />
        <WhiteSpace />
        <WhiteSpace />
        <WhiteSpace />
        <WhiteSpace />
        <div style={{width:'100%'}}>
          <Button style={{backgroundColor:'#FF2C2C',color:'#FFFFFF',width:'80%',marginLeft:'10%'}}>通过</Button>
        </div>
        <WhiteSpace />
        <div style={{width:'100%'}}>
          <Button style={{border:'1px solid #FF2C2C',color:'#FF2C2C',width:'80%',marginLeft:'10%'}}>拒绝</Button>
        </div>

      </div>
    );
  }
  //==组件所有函数
  //上传图片
  onChange = (files, type, index) => {
    console.log(files, type, index);
    this.setState({
      files,
    });
  }
  //开始时间改变
  startTimieOnChange = (date) => {
    console.log('onChange', date);
    this.setState({
      startTime: date
    });
  }
  //结束时间改变
  endTimieOnChange = (date) => {
    console.log('onChange', date);
    this.setState({
      endTime: date
    });
  }
}

function mapStateToProps({ infor }){
  return {
    infor
  };
}

const rwauditx = createForm()(rwaudit);

export default connect(mapStateToProps)(rwauditx);
